// src/mock/dataE.js
export const electricityData = {
  '李沛桐': {
    history: [
      {
        address: '古河路5号万山城市花园41号楼2单元602室',
        yearMonth: '202508',
        electricityUsage: 0,
        paymentStatus: '全部结清'
      },
      {
        address: '古河路5号万山城市花园41号楼2单元602室',
        yearMonth: '202507',
        electricityUsage: 0,
        paymentStatus: '全部结清'
      },
      {
        address: '古河路5号万山城市花园41号楼2单元602室',
        yearMonth: '202506',
        electricityUsage: 0,
        paymentStatus: '全部结清'
      },
      {
        address: '古河路5号万山城市花园41号楼2单元602室',
        yearMonth: '202505',
        electricityUsage: 0,
        paymentStatus: '全部结清'
      },
      {
        address: '古河路5号万山城市花园41号楼2单元602室',
        phone: '18994540012',
        yearMonth: '202504',
        electricityUsage: 0,
        paymentStatus: '全部结清'
      },
      {
        address: '古河路5号万山城市花园41号楼2单元603室',
        phone: '18994540012',
        yearMonth: '202503',
        electricityUsage: 0,
        paymentStatus: '全部结清'
      },
      {
        address: '古河路5号万山城市花园41号楼2单元604室',
        phone: '18994540012',
        yearMonth: '202502',
        electricityUsage: 0,
        paymentStatus: '全部结清'
      },
      {
        address: '古河路5号万山城市花园41号楼2单元605室',
        phone: '18994540012',
        yearMonth: '202501',
        electricityUsage: 0,
        paymentStatus: '全部结清'
      },
      {
        address: '古河路5号万山城市花园41号楼2单元606室',
        phone: '18994540012',
        yearMonth: '202412',
        electricityUsage: 7,
        paymentStatus: '全部结清'
      },
      {
        address: '古河路5号万山城市花园41号楼2单元607室',
        phone: '18994540012',
        yearMonth: '202411',
        electricityUsage: 0,
        paymentStatus: '全部结清'
      },
      {
        address: '古河路5号万山城市花园41号楼2单元608室',
        phone: '18994540012',
        yearMonth: '202410',
        electricityUsage: 0,
        paymentStatus: '全部结清'
      },
      {
        address: '古河路5号万山城市花园41号楼2单元609室',
        phone: '18994540012',
        yearMonth: '202409',
        electricityUsage: 0,
        paymentStatus: '全部结清'
      }
    ],
    latest: {
      address: '古河路5号万山城市花园41号楼2单元602室',
      phone: '17705136111',
      totalReading: 7.01,
      peakReading: 6.05,
      valleyReading: 0.95,
      date: '2025/9/29'
    }
  },
  '孙广才': {
    history: [
      {
        address: '江苏省连云港市海州区新东街道凤凰大道19号合力铂金家园10幢1单元1203室',
        phone: '13812345678',
        yearMonth: '202508',
        electricityUsage: 0,
        paymentStatus: '全部结清'
      },
      {
        address: '江苏省连云港市海州区新东街道凤凰大道19号合力铂金家园10幢1单元1204室',
        phone: '13812345678',
        yearMonth: '202507',
        electricityUsage: 0,
        paymentStatus: '全部结清'
      },
      {
        address: '江苏省连云港市海州区新东街道凤凰大道19号合力铂金家园10幢1单元1205室',
        phone: '13812345678',
        yearMonth: '202506',
        electricityUsage: 0,
        paymentStatus: '全部结清'
      },
      {
        address: '江苏省连云港市海州区新东街道凤凰大道19号合力铂金家园10幢1单元1206室',
        phone: '13812345678',
        yearMonth: '202505',
        electricityUsage: 107,
        paymentStatus: '全部结清'
      },
      {
        address: '江苏省连云港市海州区新东街道凤凰大道19号合力铂金家园10幢1单元1207室',
        phone: '13812345678',
        yearMonth: '202505',
        electricityUsage: 107,
        paymentStatus: '全部结清'
      },
      {
        address: '江苏省连云港市海州区新东街道凤凰大道19号合力铂金家园10幢1单元1208室',
        phone: '13812345678',
        yearMonth: '202504',
        electricityUsage: 141,
        paymentStatus: '全部结清'
      },
      {
        address: '江苏省连云港市海州区新东街道凤凰大道19号合力铂金家园10幢1单元1209室',
        phone: '13812345678',
        yearMonth: '202504',
        electricityUsage: 141,
        paymentStatus: '全部结清'
      },
      {
        address: '江苏省连云港市海州区新东街道凤凰大道19号合力铂金家园10幢1单元1210室',
        phone: '13812345678',
        yearMonth: '202503',
        electricityUsage: 207,
        paymentStatus: '全部结清'
      },
      {
        address: '江苏省连云港市海州区新东街道凤凰大道19号合力铂金家园10幢1单元1211室',
        phone: '13812345678',
        yearMonth: '202503',
        electricityUsage: 207,
        paymentStatus: '全部结清'
      },
      {
        address: '江苏省连云港市海州区新东街道凤凰大道19号合力铂金家园10幢1单元1212室',
        phone: '13812345678',
        yearMonth: '202502',
        electricityUsage: 253,
        paymentStatus: '全部结清'
      },
      {
        address: '江苏省连云港市海州区新东街道凤凰大道19号合力铂金家园10幢1单元1213室',
        phone: '13812345678',
        yearMonth: '202502',
        electricityUsage: 253,
        paymentStatus: '全部结清'
      },
      {
        address: '江苏省连云港市海州区新东街道凤凰大道19号合力铂金家园10幢1单元1214室',
        phone: '13812345678',
        yearMonth: '202501',
        electricityUsage: 269,
        paymentStatus: '全部结清'
      },
      {
        address: '江苏省连云港市海州区新东街道凤凰大道19号合力铂金家园10幢1单元1215室',
        phone: '13812345678',
        yearMonth: '202501',
        electricityUsage: 269,
        paymentStatus: '全部结清'
      },
      {
        address: '江苏省连云港市海州区新东街道凤凰大道19号合力铂金家园10幢1单元1216室',
        phone: '13812345678',
        yearMonth: '202412',
        electricityUsage: 228,
        paymentStatus: '全部结清'
      },
      {
        address: '江苏省连云港市海州区新东街道凤凰大道19号合力铂金家园10幢1单元1217室',
        phone: '13812345678',
        yearMonth: '202412',
        electricityUsage: 228,
        paymentStatus: '全部结清'
      },
      {
        address: '江苏省连云港市海州区新东街道凤凰大道19号合力铂金家园10幢1单元1218室',
        phone: '13812345678',
        yearMonth: '202411',
        electricityUsage: 199,
        paymentStatus: '全部结清'
      },
      {
        address: '江苏省连云港市海州区新东街道凤凰大道19号合力铂金家园10幢1单元1219室',
        phone: '13812345678',
        yearMonth: '202410',
        electricityUsage: 194,
        paymentStatus: '全部结清'
      },
      {
        address: '江苏省连云港市海州区新东街道凤凰大道19号合力铂金家园10幢1单元1220室',
        phone: '13812345678',
        yearMonth: '202410',
        electricityUsage: 194,
        paymentStatus: '全部结清'
      },
      {
        address: '江苏省连云港市海州区新东街道凤凰大道19号合力铂金家园10幢1单元1221室',
        phone: '13812345678',
        yearMonth: '202409',
        electricityUsage: 213,
        paymentStatus: '全部结清'
      }
    ],
    latest: {
      address: '江苏省连云港市海州区新东街道凤凰大道19号合力铂金家园10幢1单元1203室',
      phone: '13023479939',
      totalReading: 7428.39,
      peakReading: 4018.38,
      valleyReading: 3410.01,
      date: '2025/9/29'
    }
  }
};

export const getElectricityDataByName = (name) => {
  const data = electricityData[name];
  return data ? data.history : [];
};

export const getLatestElectricityDataByName = (name) => {
  const data = electricityData[name];
  return data ? data.latest : null;
};
